home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
p4
/
p4-1_2b.lha
/
p4-1.2b
/
messages
/
temp2.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-18
|
346b
|
22 lines
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
int i;
char *cp, msg[222];
printf("enter a string:\n");
while (fgets(msg, sizeof(msg), stdin) != NULL)
{
for(cp=msg, i=1; *cp; i++, cp++)
if(*cp == '\n')
{
*cp = 0;
break;
}
printf("read msg=:%s:\n",msg);
printf("enter a string:\n");
}
}